﻿using Syspetro.Core.DbAccessor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Syspetro.Core.AppDeal
{
    [Serializable]
    public class OrderByReq<T> : IOrderByReq where T : IEntityBase, new()
    {
        public string OrderBy { get; set; }
        public string Sorting { get; set; }

        /// <summary>
        /// 是否升序
        /// </summary>
        /// <returns></returns>
        public virtual bool IsAscending()
        {
            return string.Compare(Sorting, "asc", true) == 0;
        }
    }
}
